<%= simple_form_for [main_app, @form], html: { multipart: true } do |f| %>
  <% unless f.object.persisted? %>
    <% content_for :metadata_tab do %>
      <p class="switch-upload-type">To create a separate work for each of the files, go to <%= link_to "Batch upload", sufia.new_batch_upload_path %></p>
    <% end %>
  <% end %>
  <%= render 'curation_concerns/base/guts4form', f: f %>
<% end %>

<script type="text/javascript">
  Blacklight.onLoad(function() {
    <%# This causes the page to switch back to the default template if they've
        previously visited the batch download page in this Turbolinks session %>
    $("#fileupload").fileupload('option', 'downloadTemplateId', 'template-download')
  });
</script>
